All Questions
Tagged with ruby-on-railserror-handling
8 questions
1vote
1answer
67views
Enumerating AWS instances in Rails, with error handling
I have created a method, which is raising the same exception in case of any error: ...
0votes
1answer
66views
Ruby class to encapsulate Retrying (for instance, with email)
One of my clients sends quite a few emails a day ... I would think over 500. They are mostly reports to clients or employees. The volume has become sufficient that intermittent issues with gmail (like ...
4votes
2answers
238views
Optimize the CSV Upload function in Ruby On Rails
The code is working fine however, I would like to fix code after unless and can I store thread ID in the database too? Is there a way to improve performance? ...
4votes
1answer
2kviews
Error handling for Stripe credit card processing
I have a rails application that uses Stripe for credit card processing. Currently several exceptions are being handled anywhere a transaction takes place. The code below is being used currently in 11 ...
7votes
1answer
130views
Controller action to process orders and payments
I'm trying to reduce the if statements and simplify this create action. ...
3votes
0answers
572views
Rails app that scrapes forum using Nokogiri gem
I've built a website that scrapes a guitar forum's pages and populates Rails model. I'm using rake task along with heroku scheduler to run background scrapes every hour. On the homepage, the forum ads ...
1vote
1answer
406views
How to refactor this importer to handle validation errors?
This is my importer to database from excel file. I would like to handle situations when any error raise. To not breaks whole import when one errors occurs. For example when there is duplicated record ...
8votes
2answers
6kviews
Handling nil: Trying to avoid #try
Yesterday, I introduced a bug into our codebase by calling #titleize on a string that could possibly come in as nil: ...